package com.macro.mall.model.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
public class ProductBatchGetResponse {
    private Boolean success;
    private String msg;
    private Integer code;
    private ProductBatchGetData data;

    @Data
    public static class ProductBatchGetData {
        private List<ProductItem> list;
        private Long total;
    }

    @Data
    public static class ProductItem {
        @JsonProperty("out_product_id")
        private String outProductId;
        private String name;
        private String desc;
        private String path;
        @JsonProperty("top_image")
        private String topImage;
        @JsonProperty("category_id")
        private String categoryId;
        @JsonProperty("biz_create_time")
        private Long bizCreateTime;
        @JsonProperty("biz_update_time")
        private Long bizUpdateTime;
        private List<SkuItem> skus;
        private Integer status;
        @JsonProperty("short_title")
        private String shortTitle;
        @JsonProperty("audit_info")
        private AuditInfo auditInfo;
        @JsonProperty("product_type")
        private Integer productType;
        @JsonProperty("settle_type")
        private Integer settleType;
        @JsonProperty("category_id_v2")
        private String categoryIdV2;
        @JsonProperty("item_id")
        private String itemId;
    }

    @Data
    public static class SkuItem {
        @JsonProperty("out_sku_id")
        private String outSkuId;
        private String name;
        @JsonProperty("short_title")
        private String shortTitle;
        @JsonProperty("sku_image")
        private String skuImage;
        @JsonProperty("origin_price")
        private Long originPrice;
        @JsonProperty("sale_price")
        private Long salePrice;
        private Integer status;
        @JsonProperty("sku_id")
        private String skuId;
    }

    @Data
    public static class AuditInfo {
        @JsonProperty("submit_time")
        private Long submitTime;
        @JsonProperty("audit_time")
        private Long auditTime;
        @JsonProperty("reject_reason")
        private String rejectReason;
    }
}
